package leetcode.utils;

import java.rmi.dgc.VMID;
import java.util.Arrays;

public class main {


    public static void main(String[] args) {
        int[] s = {1,2};
        int a =findMin(s);


    }
    public static int findMin(int[] nums) {
        int left = 0;
        int right = nums.length;
        int mid;
        int target = nums[0];
        while(left<right){
            mid = left + (right - left)/2;
            if(nums[mid]>=target){
                left = mid+1;
            }
            else if(nums[mid]<target){
                right = mid ;
            }
        }
        return left;
    }


}
